$(document).ready(function () {
    $("#loginsubmit").click(function () {
    	var user=$("#user").val();
    	var password=$("#password").val();
    	if(user!=0){
    		if(password!=0){
    			 var options = {
    			            url: 'doLogin',
    			            type: 'post',
    			            dataType: 'json',
    			            data:{userName:$("#userName").val(),password:$("#password").val(),rememberMe:$("#brand1").is(':checked')},
    			            success: function (data) {
    			                if(data.loginStatus){
    			                	location.href = data.href;
    			                }else{
    			                	sweetAlert(data.loginInfo)
    			                }
    			            }
    			        };
    			 $.ajax(options);
    		}else{
    			sweetAlert("请输入密码!")
    		}
    	}else{
    		sweetAlert("请输入账号!")
    	}
    });
});